package com.example.demo.serviceipml;

import com.example.demo.dao.OrderDao;
import com.example.demo.entify.Order;
import com.example.demo.entify.Record;
import com.example.demo.service.OrderService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderSericeImp implements OrderService {
    @Autowired
    private OrderDao orderDao;
    @Override
    public int addOrder(Order order) {
        return orderDao.addOrder(order);
    }
	@Override
	public List<Order> Allolders() {
		// TODO Auto-generated method stub
		return orderDao.Allolders();
	}
	@Override
	public List<Order> WorkerOlders(String username) {
		// TODO Auto-generated method stub
		return orderDao.WorkerOlders(username);
	}
	@Override
	public int updateState(Order order) {
		// TODO Auto-generated method stub
		return orderDao.updateState(order);
	}
	
	@Override
	public List<Order> WorkerOlders2(String worker) {
		// TODO Auto-generated method stub
		return orderDao.WorkerOlders2(worker);
	}
	@Override
	public int rejectOrder(Order order) {
		// TODO Auto-generated method stub
		return orderDao.rejectOrder(order);
	}
	@Override
	public int Redistribute(Order order) {
		// TODO Auto-generated method stub
		return orderDao.Redistribute(order);
	}
	@Override
	public Order findOrderByid(Integer orderid) {
		// TODO Auto-generated method stub
		return orderDao.findOrderByid(orderid);
	}
	@Override
	public int AddRecord(Record record) {
		// TODO Auto-generated method stub
		return orderDao.AddRecord(record);
	}
	@Override
	public List<Record> list(Integer orderId) {
		// TODO Auto-generated method stub
		return orderDao.list(orderId);
	}


}
